﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MinerManager.Models
{
	/// <summary>
	/// 矿机信息。
	/// </summary>
	public class MinerModel
	{
		/// <summary>
		/// 复选框是否被选中
		/// </summary>
		public bool Checked { get; set; }

		/// <summary>
		/// 矿机Id
		/// </summary>
		public int ID { get; set; }
		
		/// <summary>
		/// 用户Id
		/// </summary>
		public int UserID { get; set; }

		/// <summary>
		/// 网卡Mac地址
		/// </summary>
		public string MacAddress { get; set; }

		/// <summary>
		/// 是否双挖
		/// </summary>
		public bool Second { get; set; }

		/// <summary>
		/// 自动名称
		/// </summary>
		public bool AutoName { get; set; }
		
		/// <summary>
		/// 自动运行
		/// </summary>
		public bool AutoRun { get; set; }
		
		public bool AutoUpdate { get; set; }
		
		/// <summary>
		/// 矿机名称
		/// </summary>
		public string MinerName { get; set; }

		/// <summary>
		/// 状态
		/// 0 不在线
		/// 1 在线
		/// 2 挖矿中
		/// </summary>
		public int State { get; set; }

		/// <summary>
		/// 状态
		/// </summary>
		public string StateName
		{
			get
			{
				string result = "-";
				switch (State)
				{
					case 0: result = "不在线"; break;
					case 1: result = "在线"; break;
					case 2: result = "挖矿中"; break;
				}
				return result;
			}
		}
		
		/// <summary>
		/// 状态变化时间
		/// </summary>
		public DateTime StateTime { get; set; }
		
		/// <summary>
		/// 主币名称
		/// </summary>
		public string FirstCoin { get; set; }
		
		/// <summary>
		/// 辅币名称
		/// </summary>
		public string SecondCoin { get; set; }
		
		/// <summary>
		/// 主币矿池
		/// </summary>
		public string FirstPool { get; set; }

		/// <summary>
		/// 备用矿池
		/// </summary>
		public string BackupPool { get; set; }

		/// <summary>
		/// 主币钱包
		/// </summary>
		public string FirstWallet { get; set; }

		/// <summary>
		/// 主币算力
		/// </summary>
		public string FirstHashrate { get; set; }

		/// <summary>
		/// 辅币矿池
		/// </summary>
		public string SecondPool { get; set; }
		
		/// <summary>
		/// 辅币钱包
		/// </summary>
		public string SecondWallet { get; set; }

		/// <summary>
		/// 算力比重
		/// </summary>
		public string Dcri { get; set; }

		/// <summary>
		/// 辅币算力
		/// </summary>
		public string SecondHashrate { get; set; }

		/// <summary>
		/// 最小风扇比例
		/// </summary>
		public string MinFan { get; set; }
		
		/// <summary>
		/// 最大风扇比例
		/// </summary>
		public string MaxFan { get; set; }
		
		/// <summary>
		/// 高级指令
		/// </summary>
		public string AdvParams { get; set; }
		
		/// <summary>
		/// 最低温度
		/// </summary>
		public string MinTemp { get; set; }
		
		/// <summary>
		/// 最高温度
		/// </summary>
		public string MaxTemp { get; set; }

		/// <summary>
		/// 3G显卡支持
		/// </summary>
		public string Eres { get; set; }

		/// <summary>
		/// 最低算力预警
		/// </summary>
		public string MinSpeed { get; set; }

		/// <summary>
		/// 高温策略
		/// </summary>
		public McsUtility.Models.HighTempStrategy HighTempStrategy { get; set; }
		
		/// <summary>
		/// 是否高温报警
		/// </summary>
		public bool HighTempWarn { get; set; }

		/// <summary>
		/// 是否低算力报警
		/// </summary>
		public bool LowStrengthWarn { get; set; }

		/// <summary>
		/// 内核
		/// </summary>
		public McsUtility.Models.CoreType CoreType { get; set; }

		/// <summary>
		/// 显卡平均温度
		/// </summary>
		public string TempAvg { get; set; }

		/// <summary>
		/// 风扇平均转速
		/// </summary>
		public string FanAvg { get; set; }
	}
}
